From 81100c2a86950637ff25dbcff47c14e448b19c39 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 3 Aug 2007 09:04:29 +0100 Subject: [PATCH] es7000: Remove the bulk of the ES7000 specific code from Xen. On the Unisys ES7000-One, Xen now uses the bigsmp APIC driver. This patch has been tested on the ES7000 and a commodity box. Signed-off-by: Raj Subrahmanian --- xen/arch/x86/genapic/Makefile | 2 - xen/arch/x86/genapic/bigsmp.c | 10 +- xen/arch/x86/genapic/es7000.c | 27 ---- xen/arch/x86/genapic/es7000plat.c | 141 ------------------ xen/arch/x86/genapic/probe.c | 2 - .../asm-x86/mach-es7000/mach_mpparse.h | 45 ------ 6 files changed, 7 insertions(+), 220 deletions(-) delete mode 100644 xen/arch/x86/genapic/es7000.c delete mode 100644 xen/arch/x86/genapic/es7000plat.c delete mode 100644 xen/include/asm-x86/mach-es7000/mach_mpparse.h diff --git a/xen/arch/x86/genapic/Makefile b/xen/arch/x86/genapic/Makefile index 1fcc2b9edb..83e406d4f7 100644 --- a/xen/arch/x86/genapic/Makefile +++ b/xen/arch/x86/genapic/Makefile @@ -1,7 +1,5 @@ obj-y += bigsmp.o obj-y += default.o obj-y += delivery.o -obj-y += es7000.o -obj-y += es7000plat.o obj-y += probe.o obj-y += summit.o diff --git a/xen/arch/x86/genapic/bigsmp.c b/xen/arch/x86/genapic/bigsmp.c index fb0a4d433b..95a0608b75 100644 --- a/xen/arch/x86/genapic/bigsmp.c +++ b/xen/arch/x86/genapic/bigsmp.c @@ -13,7 +13,7 @@ static int dmi_bigsmp; /* can be set by dmi scanners */ -static __init int hp_ht_bigsmp(struct dmi_system_id *d) +static __init int force_bigsmp(struct dmi_system_id *d) { printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); dmi_bigsmp = 1; @@ -22,15 +22,19 @@ static __init int hp_ht_bigsmp(struct dmi_system_id *d) static struct dmi_system_id __initdata bigsmp_dmi_table[] = { - { hp_ht_bigsmp, "HP ProLiant DL760 G2", { + { force_bigsmp, "HP ProLiant DL760 G2", { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_BIOS_VERSION, "P44-"), }}, - { hp_ht_bigsmp, "HP ProLiant DL740", { + { force_bigsmp, "HP ProLiant DL740", { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), DMI_MATCH(DMI_BIOS_VERSION, "P47-"), }}, + { force_bigsmp, "UNISYS ES7000-ONE", { + DMI_MATCH(DMI_PRODUCT_NAME, "ES7000-ONE") + }}, + { } }; diff --git a/xen/arch/x86/genapic/es7000.c b/xen/arch/x86/genapic/es7000.c deleted file mode 100644 index 09228f7dea..0000000000 --- a/xen/arch/x86/genapic/es7000.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * APIC driver for the Unisys ES7000 chipset. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static __init int probe_es7000(void) -{ - /* probed later in mptable/ACPI hooks */ - return 0; -} - -struct genapic apic_es7000 = { - APIC_INIT("es7000", probe_es7000), - GENAPIC_PHYS -}; diff --git a/xen/arch/x86/genapic/es7000plat.c b/xen/arch/x86/genapic/es7000plat.c deleted file mode 100644 index 895de54fd4..0000000000 --- a/xen/arch/x86/genapic/es7000plat.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Written by: Garry Forsgren, Unisys Corporation - * Natalie Protasevich, Unisys Corporation - * Modified by: Raj Subrahmanian Unisys Corp. - * This file contains the code to configure and interface - * with Unisys ES7000 series hardware system manager. - * - * Copyright (c) 2003 Unisys Corporation. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Unisys Corporation, Township Line & Union Meeting - * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or: - * - * http://www.unisys.com - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MIP_REG 1 -#define MIP_PSAI_REG 4 - -struct acpi_table_sdt { - unsigned long pa; - unsigned long count; - struct { - unsigned long pa; - enum acpi_table_id id; - unsigned long size; - } entry[50]; -}; - -struct oem_table { - struct acpi_table_header Header; - u32 OEMTableAddr; - u32 OEMTableSize; -}; - -int __init -parse_unisys_oem(char *oemptr) -{ - int i; - int success = 0; - unsigned char type, size; - char *tp = NULL; - - tp = oemptr; - - tp += 8; - - for (i=0; i <= 6; i++) { - type = *tp++; - size = *tp++; - tp -= 2; - switch (type) { - case MIP_REG: - case MIP_PSAI_REG: - success++; - break; - default: - break; - } - tp += size; - } - - return (success >= 2); -} - -int __init -find_unisys_acpi_oem_table(unsigned long *oem_addr) -{ - struct acpi_table_rsdp *rsdp = NULL; - unsigned long rsdp_phys = 0; - struct acpi_table_header *header = NULL; - int i; - struct acpi_table_sdt sdt = { 0 }; /* initialise sdt.count */ - - rsdp_phys = acpi_find_rsdp(); - rsdp = __va(rsdp_phys); - if (rsdp->rsdt_address) { - struct acpi_table_rsdt *mapped_rsdt = NULL; - sdt.pa = rsdp->rsdt_address; - - header = (struct acpi_table_header *) - __acpi_map_table(sdt.pa, sizeof(struct acpi_table_header)); - if (!header) - return -ENODEV; - - sdt.count = (header->length - sizeof(struct acpi_table_header)) >> 3; - mapped_rsdt = (struct acpi_table_rsdt *) - __acpi_map_table(sdt.pa, header->length); - if (!mapped_rsdt) - return -ENODEV; - - header = &mapped_rsdt->header; - - for (i = 0; i < sdt.count; i++) - sdt.entry[i].pa = (unsigned long) mapped_rsdt->entry[i]; - }; - for (i = 0; i < sdt.count; i++) { - - header = (struct acpi_table_header *) - __acpi_map_table(sdt.entry[i].pa, - sizeof(struct acpi_table_header)); - if (!header) - continue; - if (!strncmp((char *) &header->signature, "OEM1", 4)) { - if (!strncmp((char *) &header->oem_id, "UNISYS", 6)) { - void *addr; - struct oem_table *t; - acpi_table_print(header, sdt.entry[i].pa); - t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length); - addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize); - *oem_addr = (unsigned long) addr; - return 0; - } - } - } - return -1; -} diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c index 324594bc56..eaf1df24c7 100644 --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -16,7 +16,6 @@ extern struct genapic apic_summit; extern struct genapic apic_bigsmp; -extern struct genapic apic_es7000; extern struct genapic apic_default; struct genapic *genapic; @@ -24,7 +23,6 @@ struct genapic *genapic; struct genapic *apic_probe[] __initdata = { &apic_summit, &apic_bigsmp, - &apic_es7000, &apic_default, /* must be last */ NULL, }; diff --git a/xen/include/asm-x86/mach-es7000/mach_mpparse.h b/xen/include/asm-x86/mach-es7000/mach_mpparse.h deleted file mode 100644 index 470793e853..0000000000 --- a/xen/include/asm-x86/mach-es7000/mach_mpparse.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __ASM_MACH_MPPARSE_H -#define __ASM_MACH_MPPARSE_H - -#include - -extern int parse_unisys_oem(char *oemptr); -extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); - -static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, - char *productid) -{ - if (mpc->mpc_oemptr) { - struct mp_config_oemtable *oem_table = - (struct mp_config_oemtable *)(long)mpc->mpc_oemptr; - if (!strncmp(oem, "UNISYS", 6)) - return parse_unisys_oem((char *)oem_table); - } - return 0; -} - -static inline int es7000_check_dsdt(void) -{ - struct acpi_table_header *header = NULL; - if(!acpi_get_table_header_early(ACPI_DSDT, &header)) - acpi_table_print(header, 0); - if (!strncmp(header->oem_id, "UNISYS", 6)) - return 1; - return 0; -} - -/* Hook from generic ACPI tables.c */ -static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) -{ - unsigned long oem_addr; - if (!find_unisys_acpi_oem_table(&oem_addr)) { - if (es7000_check_dsdt()) - return parse_unisys_oem((char *)oem_addr); - else - return 1; - } - return 0; -} - - -#endif /* __ASM_MACH_MPPARSE_H */ -- 2.30.2